<?php

class Application_Model_Offer
{
	protected $_offerId;
	protected $_user;
	protected $_object;
	protected $_classe;
	protected $_id_classe;
	protected $_price;
	protected $_price_currency;
	protected $_avalability;
	protected $_status;
	protected $_start_date;
	protected $_end_date;
	protected $_description;
	protected $_addresses;
	

	
	public function __construct(array $options = null)
	{
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}
	
	public function __set($name, $value)
	{
		$method = 'set' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid offer property');
		}
		$this->$method($value);
	}
	
	public function __get($name)
	{
		$method = 'get' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid offer  property');
		}
		return $this->$method();
	}
	
	public function setOptions(array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}
	/**
	 * @return the $_offerId
	 */
	public function getOfferId() {
		return $this->_offerId;
	}

	/**
	 * @return the $_user
	 */
	public function getUser() {
		return $this->_user;
	}

	/**
	 * @return the $_object
	 */
	public function getObject() {
		return $this->_object;
	}

	

	/**
	 * @return the $_classe
	 */
	public function getClasse() {
		return $this->_classe;
	}

	/**
	 * @return the $_id_classe
	 */
	public function getId_classe() {
		return $this->_id_classe;
	}

	/**
	 * @param field_type $_classe
	 */
	public function setClasse($_classe) {
		$this->_classe = $_classe;
	}

	/**
	 * @param field_type $_id_classe
	 */
	public function setId_classe($_id_classe) {
		$this->_id_classe = $_id_classe;
	}

	/**
	 * @return the $_price
	 */
	public function getPrice() {
		return $this->_price;
	}

	/**
	 * @return the $_price_currency
	 */
	public function getPrice_currency() {
		return $this->_price_currency;
	}

	/**
	 * @return the $_avalability
	 */
	public function getAvalability() {
		return $this->_avalability;
	}

	/**
	 * @return the $_status
	 */
	public function getStatus() {
		return $this->_status;
	}

	/**
	 * @return the $_start_date
	 */
	public function getStart_date() {
		return $this->_start_date;
	}

	/**
	 * @return the $_end_date
	 */
	public function getEnd_date() {
		return $this->_end_date;
	}

	/**
	 * @param field_type $_offerId
	 */
	public function setOfferId($_offerId) {
		$this->_offerId = $_offerId;
	}

	/**
	 * @param field_type $_user
	 */
	public function setUser(Application_Model_User $_user) {
		$this->_user = $_user;
	}

	/**
	 * @param field_type $_object
	 */
	public function setObject(Application_Model_Object $_object) {
		$this->_object = $_object;
	}

	/**
	 * @param field_type $_price
	 */
	public function setPrice($_price) {
		$this->_price = $_price;
	}

	/**
	 * @param field_type $_price_currency
	 */
	public function setPrice_currency($_price_currency) {
		$this->_price_currency = $_price_currency;
	}

	/**
	 * @param field_type $_avalability
	 */
	public function setAvalability($_avalability) {
		$this->_avalability = $_avalability;
	}

	/**
	 * @param field_type $_status
	 */
	public function setStatus($_status) {
		$this->_status = $_status;
	}

	/**
	 * @param field_type $_start_date
	 */
	public function setStart_date($_start_date) {
		$this->_start_date = $_start_date;
	}

	/**
	 * @param field_type $_end_date
	 */
	public function setEnd_date($_end_date) {
		$this->_end_date = $_end_date;
	}
	/**
	 * @return the $_description
	 */
	public function getDescription() {
		return $this->_description;
	}

	/**
	 * @param field_type $_description
	 */
	public function setDescription($_description) {
		$this->_description = $_description;
	}

	/**
	 * @return the $_addresses
	 */
	public function getAddresses() {
		return $this->_addresses;
	}
	
	/**
	 * @param field_type $_addresses
	 */
	public function setAddresses(array $_addresses) {
		$this->_addresses = $_addresses;
	}

	
	
}